#include <iostream>
#include <vector>

int main()
{
    std::string s;
    std::cin >> s;

    int i = 0;
    int ret = 0;
    int sign = 1;
    while (i < s.size())
    {
        int cur = i;
        while (i < s.size() && std::isdigit(s[i]))
        {
            i++;
        }
        if (i - cur > 0)
        {
            if (cur == 0)
            {
                int num = 0;
                for (int j = cur; j < i; j++)
                {
                    num += s[j] - '0';
                }
                ret += num;
            }
            else if (s[cur - 1] == '-')
            {
                int num = 0;
                for (int j = cur; j < i; j++)
                {
                    num = num * 10 + s[j] - '0';
                }
                ret -= num;
            }
            else
            {
                int num = 0;
                for (int j = cur; j < i; j++)
                {
                    num += s[j] - '0';
                }
                ret += num;
            }
        }
        else
        {
            i++;
        }
    }
    std::cout << ret << std::endl;

    return 0;
}